Not able to access any mothod with the attribute [webinvoke ] in WCF Restful services

Posted by user1335978 on Stack Overflow See other posts from Stack Overflow or by user1335978
Published on 2012-04-16T09:58:12Z Indexed on 2012/04/16 11:29 UTC
Read the original article Hit count: 202

Filed under:
|
|

I am not able to access any method with the attribute [webinvoke] in a RESTful WCF service.

My code is like this:

[OperationContract]
[WebInvoke(Method = "Post", UriTemplate = "Comosite/{composite}", ResponseFormat = WebMessageFormat.Xml)]
CompositeType GetDataUsingDataContract(string composite);        

On executing the above service I am getting an error message

Method not allowed.

I tried many ways, by modifying the urltemplate, method name and method type etc. but nothing is working out.

But if I use the [WebGet] attribute the the service method is working fine.

Can anybody suggest me what can I do make it work?

Thanks in advance... :)

© Stack Overflow or respective owner

Related posts about wcf

Related posts about service